]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: defer session update until startup animation
authorRay Strode <rstrode@redhat.com>
Mon, 4 Mar 2013 02:58:37 +0000 (21:58 -0500)
committerRay Strode <rstrode@redhat.com>
Mon, 4 Mar 2013 21:45:32 +0000 (16:45 -0500)
We currently call the session updated handler as soon as
the session modes are read.  This handler sets up keybindings
for leaving the overview (if a user session) and shows the
login dialog (if a gdm session).

We can't do the latter until the stage is mapped because it
takes a grab, and we don't need to do the former until the
user goes into the overview.

This commit defers processing session updates until the
the layout manager says start up is prepared.

It fixes a race condition at login screen startup now that
we don't show the stage right away.

https://bugzilla.gnome.org/show_bug.cgi?id=694321

js/ui/main.js

index a2761624c9ef90ea52712dda6c9820cf456d0db3..df40300350614b457294cb78ab4627e75d69fd01 100644 (file)
@@ -159,8 +159,6 @@ function startSession() {
     global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
                                             false, -1, 1);
     global.display.connect('overlay-key', Lang.bind(overview, overview.toggle));
-    sessionMode.connect('updated', _sessionUpdated);
-    _sessionUpdated();
 
     // Provide the bus object for gnome-session to
     // initiate logouts.
@@ -201,6 +199,9 @@ function startSession() {
                               if (keybindingMode == Shell.KeyBindingMode.NONE) {
                                   keybindingMode = Shell.KeyBindingMode.NORMAL;
                               }
+
+                              sessionMode.connect('updated', _sessionUpdated);
+                              _sessionUpdated();
                           });
 }